package com.show.web.thermodynamic;

import com.show.service.unit.UnitService;
import com.show.service.unit.UnitTypeService;
import com.show.util.FileUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.Map;

/**
 * 热力图
 *
 * @author 姜文
 */
@Controller
public class ThermodynamicTurnController {

    private UnitTypeService unitTypeService;

    private UnitService unitService;

    private FileUtil fileUtil;

    @Autowired
    public ThermodynamicTurnController(UnitTypeService unitTypeService, UnitService unitService, FileUtil fileUtil) {
        this.unitTypeService = unitTypeService;
        this.unitService = unitService;
        this.fileUtil = fileUtil;
    }

    /**
     * 跳转到热力图index页面
     *
     * @author 姜文
     */
    @GetMapping(value = "toThermodynamic")
    public String toThermodynamic() {
        return "thermodynamic/thermodynamic_index";
    }

    /**
     * 跳转到热力图list页面
     *
     * @author 姜文
     */
    @GetMapping(value = "toThermodynamicList")
    public String toThermodynamicList(Map<String, Object> map) {
        map.put("SERVERIP", fileUtil.getSERVERIP());
        map.put("LNG", fileUtil.getLNG());
        map.put("LAT", fileUtil.getLAT());
        return "thermodynamic/thermodynamic_list";
    }

}
